package com.steak.concurrent.lock.reentrantlock;

import java.util.concurrent.locks.AbstractQueuedSynchronizer;
import java.util.concurrent.locks.ReentrantLock;

public class ReentrantLockTest {
    private final ReentrantLock lock = new ReentrantLock();
    public void add(){
        lock.lock();
        try {
            System.out.println("get data");
        }finally {
            lock.unlock();
        }
    }
}
